<template>
  <div>
    <section v-if="name==='customer' && record">
      {{ record.customerName }}<br />
      <span v-if="record.fromAddress">
        {{ record.fromAddress.contactName }} {{ record.fromAddress.contactMobile }}<br />
        {{ record.fromAddress.province }} {{ record.fromAddress.city }} {{ record.fromAddress.district }}<br />
        {{ record.fromAddress.address }}
      </span>
    </section>
    <section v-if="name==='consignee' && record">
      {{ record.consigneeName }}<br />
      <span v-if="record.toAddress">
        {{ record.toAddress.contactName }} {{ record.toAddress.contactMobile }}<br />
        {{ record.toAddress.province }} {{ record.toAddress.city }} {{ record.toAddress.district }}<br />
        {{ record.toAddress.address }}
      </span>
    </section>
    <!-- <section v-if="name==='order' && record">
      {{record.transportMode === 1 ? '零担' : '整车'}}<br />
      {{record.deliver ? '送货 |':''}}
      {{record.pick ? '提货 |':''}}
      {{record.unload ? '卸货 |':''}}
      {{record.load ? '装货 |':''}}
      {{record.insure ? '保价':''}}<br />
      {{record.totalWeight || 0}}公斤 | {{record.totalVolume || 0}}方 | {{record.totalQuantity || 0}}件
    </section> -->
  </div>
</template>

<script>
export default {
  name: "OrderDraftInfo",
  props: {
    record: {
      type: Object,
      default: () => { }
    },
    name: String
  }
};
</script>
<style scoped>
.section-wrap {
  width: 100%;
  display: -webkit-box;
  word-break: break-all;
  text-overflow: ellipsis;
  overflow: hidden;
  /* white-space: pre-line; */
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}
</style>
